<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //算术运算符：
    //自增  X++: X=x+1  ; 自减 X--： X=X-1 
    let x=1 , y=10 , result;
    result = ++x +(++y) +y +x --+x +x; //2 +11 +11 +2 +1 +1
    console.log(x);
    console.log(y);
    console.log(result);

    console.log("------------");
    //加号+ 两端中有字符串时会将两端拼接
    let num1 = 123 , num2="hello" , res;
    res = num1 + num2;
    console.log(res);  // 打印 123hello

    console.log("------------");
    //赋值运算符
    //+= ; a+=b : a=a+b
    let a=10, b= 20;
    console.log(a+=b);

    console.log("------------");
    //位移：
    let n1 = -9., n2 = 2;
    console.log(n1>>n2);
    let m1 = 9 , m2 = 2;
    console.log(m1<<m2);

    console.log("------------");
    //等于 和 全等
    let varb1 = 123, varb2 = '123';
    console.log( varb1 == varb2); 
    console.log( varb1 === varb2);  //不会自动数据类型转换


</script>
</html>